package com.geekhome.znxz.cucumber.chapter1;

/**
 * Copyright © 2019年 znxz. All rights reserved.
 *
 * @author 临江仙 hzqiuxm@163.com
 * 一个累加器
 * @date 2019/5/21 14:03
 */
public class Addition {

    private final int x;
    private final int y;

    public Addition(int x, int y) {
        this.x = x;
        this.y = y;
    }

    public int add(){

        return x + y;
    }


    public int autoX(){

        return x+1;
    }


    public int autoY(){

        return y +1;
    }


    public int Sub(){

        return x - y;
    }


    @Override
    public String toString() {
        return "Addition{" +
                "x=" + x +
                ", y=" + y +
                '}';
    }
}
